﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Retirement/retirement.master" AutoEventWireup="true" CodeFile="manageClaims.aspx.cs" Inherits="Retirement_Admin_claim" %>

<asp:Content ID="Content" ContentPlaceHolderID="retirement_ContentPlaceHolder" runat="Server">

    <style type="text/css">
        
        .Grid th  
        {
            background-color: #B40404;
            color: #FFFFFF;
            height:30px;
        }
    </style>


    <h2 id="heading">
        <a href="../home.aspx">World Trade Bank</a> > <a href="manageClients.aspx">
            Retirement</a> > Claims</h2>
       
       
       

        <p style="font-family: 'Oxygen', Arial; font-weight: bold; font-size: 40px">
        Claim</p><br />

        <asp:TextBox ID="tb_searchPolicy" runat="server" 
        placeholder="Policy No." Height="25px"></asp:TextBox>

        <asp:ImageButton ID="tbn_searchPolicy" runat="server" 
        ImageUrl="~/Retirement/Images/search.png" Width="30" 
        ImageAlign="AbsBottom" onclick="tbn_searchPolicy_Click" CausesValidation="False"/>
        <br /><br />

        <fieldset>
        <legend style="font-size: 28px; font-weight: bold">Policy Details</legend>
        <br />
<%--        <asp:FormView ID="fv_certificate" runat="server" Width="100%">
        <ItemTemplate>--%>
        <table class="tbl_policyDetails" width="100%">
        <tr>
        <td>Policy Owner Name</td>
        <td>: <asp:Label ID="lb_ownerName" runat="server" Text=""></asp:Label></td>
        <td>Date of Issue</td>
        <td>: <asp:Label ID="lb_issueDate" runat="server" Text=""></asp:Label></td>
        </tr>

        <tr>
        <td>Plan</td>
        <td>: Flexi Protect</td>
        <td>Policy No.</td>
        <td>: <asp:Label ID="lb_policyNo" runat="server" Text=""></asp:Label></td>
        </tr>

        <tr>
        <td>Rider Name</td>
        <td>: <asp:Label ID="lb_plusRider" runat="server" Text=""></asp:Label></td>
        <td>Rider Term/Premium Duration</td>
        <td>: <asp:Label ID="lb_pluseRiderTerm" runat="server" Text=""></asp:Label></td>
        </tr>

        <tr>
        <td>Rider Name</td>
        <td>: <asp:Label ID="lb_waiverRider" runat="server" Text=""></asp:Label></td>
        <td>Rider Term/Premium Duration</td>
        <td>: <asp:Label ID="lb_waiverRiderTerm" runat="server" Text=""></asp:Label></td>
        </tr>

        <tr>
        <td>Basic Sum Insured</td>
        <td>: <asp:Label ID="lb_basicSumInsured" runat="server" Text=""></asp:Label></td>
        <td>Rider Sum Insured Balance</td>
        <td>: <asp:Label ID="lb_riderSumInsured" runat="server" Text=""></asp:Label></td>
        </tr>

        <tr>
        <td>Benefit Type</td>
        <td>: <asp:Label ID="lb_benefitType" runat="server" Text="The Higher of the Sum Insured Or Account Value"></asp:Label></td>
        <td>Account Value</td>
        <td>: <asp:Label ID="lb_accountValue" runat="server" Text=""></asp:Label></td>
        </tr>
        </table>
<%--        </ItemTemplate>
        </asp:FormView>--%>
        </fieldset>
        <br /><br />


        <fieldset>
        <legend style="font-size: 28px; font-weight: bold"><a name="target_personalDetails"></a>Claim History</legend>
        <br />
        <asp:GridView ID="gv_claimHistory" runat="server" AutoGenerateColumns="False" 
                DataSourceID="SqlDataSource_claimHistory" Width="100%" CssClass="Grid">
            <Columns>
                <asp:BoundField DataField="claimant_name" HeaderText="Claimant Name" 
                    SortExpression="claimant_name" />
                <asp:BoundField DataField="claim_type" HeaderText="Claim Type" 
                    SortExpression="claim_type" />
                <asp:BoundField DataField="claim_description" HeaderText="Claim Description" 
                    SortExpression="claim_description" />
                <asp:BoundField DataField="claim_amount" HeaderText="Claim Amount" 
                    SortExpression="claim_amount" DataFormatString="{0:C2}" />
                <asp:BoundField DataField="claim_date" DataFormatString="{0:d}" 
                    HeaderText="Claim Date" SortExpression="claim_date" />
            </Columns>
            </asp:GridView>

        <asp:SqlDataSource ID="SqlDataSource_claimHistory" runat="server" 
                ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                SelectCommand="SELECT claim_id, policy_no, claimant_name, claimant_nric, 
                 claimant_dob, claimant_relationship, claim_description, claim_amount, claim_date, 
                 CASE claim_type 
                 WHEN 'ANGIOPLASTY' THEN 'Angioplasty' 
                 WHEN 'CRITICAL_ILLNESS' THEN 'Critical Illness' 
                 WHEN 'DISABILITY' THEN 'Total/Permanet Disability' 
                 WHEN 'TERMINAL_ILLNESS' THEN 'Terminal Illness' 
                 WHEN 'DEATH' THEN 'Death' END AS claim_type
                 FROM [R_CLAIM] 
                 WHERE ([policy_no] = @policy_no)">
            <SelectParameters>
                <asp:ControlParameter ControlID="lb_policyNo" Name="policy_no" 
                    PropertyName="Text" Type="String" />
            </SelectParameters>
            </asp:SqlDataSource>
        </fieldset>
        <br /><br />

        <fieldset>
        <legend style="font-size: 28px; font-weight: bold"><a name="target_personalDetails"></a>Claim Details</legend>
            <asp:Label 
        ID="lb_msg" runat="server" Text="" ForeColor="Red"></asp:Label>
            <br />
        <asp:Label ID="lb_cbMsg" runat="server" ForeColor="Red"></asp:Label>
        <br />
      <asp:CheckBox ID="cb_allFormsSubmitted" runat="server"  Text="All necessary forms and original supporting documents has been submitted" />
      <br /><br />

      <table class="tbl_claim" width="100%">
      <tr>
        <td>Claimant's Name</td>   
        <td>: <asp:TextBox ID="tb_claimantName" runat="server" Text="" Height="25px"></asp:TextBox>
            <asp:RequiredFieldValidator ID="vd_claimantName" runat="server" 
                ControlToValidate="tb_claimantName" ErrorMessage="Please input claimant's name!" 
                ForeColor="Red"></asp:RequiredFieldValidator>
          </td>
        <td>Relationship to the Policy Onwer</td>
        <td>: <asp:TextBox ID="tb_relationship" runat="server" Text="" 
                placeholder="E.g. Spouse" Height="25px"></asp:TextBox>
            <asp:RequiredFieldValidator ID="vd_claimantRelationship" runat="server" 
                ControlToValidate="tb_relationship" ErrorMessage="Please input relationship!" 
                ForeColor="Red"></asp:RequiredFieldValidator>
          </td>
      </tr>

       <tr>
        <td>NRIC/Passport No.</td>   
        <td>: <asp:TextBox ID="tb_claimantNric" runat="server" Text="" 
                placeholder="S1234567G" Height="25px"></asp:TextBox>
            <asp:RequiredFieldValidator ID="vd_claimantNric" runat="server" 
                ControlToValidate="tb_claimantNric" ErrorMessage="Please input NRIC/Passport No.!" 
                ForeColor="Red"></asp:RequiredFieldValidator>
           </td>
        <td>Date of Birth</td>
        <td>: <asp:TextBox ID="tb_claimantDob" runat="server" Text="" 
                placeholder="dd/mm/yyyy" Height="25px"></asp:TextBox>
            <asp:RequiredFieldValidator ID="vd_claimantDob" runat="server" 
                ControlToValidate="tb_claimantDob" ErrorMessage="Please input date of birth!" 
                ForeColor="Red"></asp:RequiredFieldValidator>
           </td>
      </tr>

        <tr>
        <td>Claim Type</td>     
        <td>: <asp:DropDownList ID="ddl_claimType" runat="server" Height="30px">   
           <asp:ListItem Value="ANGIOPLASTY">Angioplasty</asp:ListItem> 
           <asp:ListItem Value="CRITICAL_ILLNESS">Critical Illness</asp:ListItem> 
           <asp:ListItem Value="DISABILITY">Total/Permanet Disability</asp:ListItem>
           <asp:ListItem Value="TERMINAL_ILLNESS">Terminal Illness</asp:ListItem>
           <asp:ListItem Value="DEATH">Death</asp:ListItem>
           </asp:DropDownList>
            <asp:ImageButton 
                ID="btn_calculate" runat="server"  CausesValidation="False"
                ImageUrl="~/Retirement/Images/calculator.png" Width="30" 
                ToolTip="Calculate MAX Claimable Amount" onclick="btn_calculate_Click" ImageAlign="AbsBottom"
                /><asp:Label 
        ID="lb_invalidClaimMessage" runat="server" Text="" ForeColor="Red"></asp:Label></td>
        <td>Claim Description</td>
        <td>: <asp:TextBox ID="tb_claimDescription" runat="server" Text="" Height="25px"></asp:TextBox>
            <asp:RequiredFieldValidator ID="vd_claimDescription" runat="server" 
                ControlToValidate="tb_claimDescription" ErrorMessage="Please input description!" 
                ForeColor="Red"></asp:RequiredFieldValidator>
            </td>
      </tr>

       <tr>
        <td>Claim Amount</td>     
        <td>: <asp:TextBox ID="tb_claimAmount" runat="server" Text="" Height="25px"></asp:TextBox>
            <asp:RequiredFieldValidator ID="vd_claimAmount" runat="server" 
                ControlToValidate="tb_claimAmount" ErrorMessage="Please input claim amount!" 
                ForeColor="Red"></asp:RequiredFieldValidator>
           </td>
        <td>&nbsp;</td>
        <td>
            &nbsp;
            <asp:Button ID="btn_fillUpInfo" runat="server" Text="Fill Up Info" CausesValidation="false"
                onclick="btn_fillUpInfo_Click" />
            &nbsp;</td>
      </tr>
      </table>
      <br />
      </fieldset>
      <br /><br />
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <asp:ImageButton ID="btn_confirm" runat="server" 
        ImageUrl="~/Retirement/Images/confirm.png" Width="150" 
        onclick="btn_confirm_Click" CausesValidation="True" />        
    <br />
    <br />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